﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000B13 RID: 2835
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class MessageSection : IMessage<MessageSection>, IMessage, IEquatable<MessageSection>, IDeepCloneable<MessageSection>, IBufferMessage
	{
		// Token: 0x170023D3 RID: 9171
		// (get) Token: 0x06007EF7 RID: 32503 RVA: 0x0015302B File Offset: 0x0015122B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<MessageSection> Parser
		{
			get
			{
				return MessageSection._parser;
			}
		}

		// Token: 0x170023D4 RID: 9172
		// (get) Token: 0x06007EF8 RID: 32504 RVA: 0x00153032 File Offset: 0x00151232
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return MessageSectionReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170023D5 RID: 9173
		// (get) Token: 0x06007EF9 RID: 32505 RVA: 0x00153044 File Offset: 0x00151244
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return MessageSection.Descriptor;
			}
		}

		// Token: 0x06007EFA RID: 32506 RVA: 0x0015304B File Offset: 0x0015124B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageSection()
		{
		}

		// Token: 0x06007EFB RID: 32507 RVA: 0x0015306C File Offset: 0x0015126C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageSection(MessageSection other) : this()
		{
			this.frozenItemId_ = other.frozenItemId_;
			this.id_ = other.id_;
			this.itemList_ = other.itemList_.Clone();
			this.messageItemList_ = other.messageItemList_.Clone();
			this.status_ = other.status_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06007EFC RID: 32508 RVA: 0x001530D6 File Offset: 0x001512D6
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageSection Clone()
		{
			return new MessageSection(this);
		}

		// Token: 0x170023D6 RID: 9174
		// (get) Token: 0x06007EFD RID: 32509 RVA: 0x001530DE File Offset: 0x001512DE
		// (set) Token: 0x06007EFE RID: 32510 RVA: 0x001530E6 File Offset: 0x001512E6
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint FrozenItemId
		{
			get
			{
				return this.frozenItemId_;
			}
			set
			{
				this.frozenItemId_ = value;
			}
		}

		// Token: 0x170023D7 RID: 9175
		// (get) Token: 0x06007EFF RID: 32511 RVA: 0x001530EF File Offset: 0x001512EF
		// (set) Token: 0x06007F00 RID: 32512 RVA: 0x001530F7 File Offset: 0x001512F7
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Id
		{
			get
			{
				return this.id_;
			}
			set
			{
				this.id_ = value;
			}
		}

		// Token: 0x170023D8 RID: 9176
		// (get) Token: 0x06007F01 RID: 32513 RVA: 0x00153100 File Offset: 0x00151300
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<MessageItem> ItemList
		{
			get
			{
				return this.itemList_;
			}
		}

		// Token: 0x170023D9 RID: 9177
		// (get) Token: 0x06007F02 RID: 32514 RVA: 0x00153108 File Offset: 0x00151308
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<uint> MessageItemList
		{
			get
			{
				return this.messageItemList_;
			}
		}

		// Token: 0x170023DA RID: 9178
		// (get) Token: 0x06007F03 RID: 32515 RVA: 0x00153110 File Offset: 0x00151310
		// (set) Token: 0x06007F04 RID: 32516 RVA: 0x00153118 File Offset: 0x00151318
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageSectionStatus Status
		{
			get
			{
				return this.status_;
			}
			set
			{
				this.status_ = value;
			}
		}

		// Token: 0x06007F05 RID: 32517 RVA: 0x00153121 File Offset: 0x00151321
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as MessageSection);
		}

		// Token: 0x06007F06 RID: 32518 RVA: 0x00153130 File Offset: 0x00151330
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(MessageSection other)
		{
			return other != null && (other == this || (this.FrozenItemId == other.FrozenItemId && this.Id == other.Id && this.itemList_.Equals(other.itemList_) && this.messageItemList_.Equals(other.messageItemList_) && this.Status == other.Status && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06007F07 RID: 32519 RVA: 0x001531B4 File Offset: 0x001513B4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.FrozenItemId != 0U)
			{
				num ^= this.FrozenItemId.GetHashCode();
			}
			if (this.Id != 0U)
			{
				num ^= this.Id.GetHashCode();
			}
			num ^= this.itemList_.GetHashCode();
			num ^= this.messageItemList_.GetHashCode();
			if (this.Status != MessageSectionStatus.MessageSectionNone)
			{
				num ^= this.Status.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06007F08 RID: 32520 RVA: 0x00153247 File Offset: 0x00151447
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06007F09 RID: 32521 RVA: 0x0015324F File Offset: 0x0015144F
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06007F0A RID: 32522 RVA: 0x00153258 File Offset: 0x00151458
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.FrozenItemId != 0U)
			{
				output.WriteRawTag(16);
				output.WriteUInt32(this.FrozenItemId);
			}
			if (this.Id != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.Id);
			}
			this.messageItemList_.WriteTo(ref output, MessageSection._repeated_messageItemList_codec);
			if (this.Status != MessageSectionStatus.MessageSectionNone)
			{
				output.WriteRawTag(112);
				output.WriteEnum((int)this.Status);
			}
			this.itemList_.WriteTo(ref output, MessageSection._repeated_itemList_codec);
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06007F0B RID: 32523 RVA: 0x001532F0 File Offset: 0x001514F0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.FrozenItemId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.FrozenItemId);
			}
			if (this.Id != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id);
			}
			num += this.itemList_.CalculateSize(MessageSection._repeated_itemList_codec);
			num += this.messageItemList_.CalculateSize(MessageSection._repeated_messageItemList_codec);
			if (this.Status != MessageSectionStatus.MessageSectionNone)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Status);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06007F0C RID: 32524 RVA: 0x00153384 File Offset: 0x00151584
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(MessageSection other)
		{
			if (other == null)
			{
				return;
			}
			if (other.FrozenItemId != 0U)
			{
				this.FrozenItemId = other.FrozenItemId;
			}
			if (other.Id != 0U)
			{
				this.Id = other.Id;
			}
			this.itemList_.Add(other.itemList_);
			this.messageItemList_.Add(other.messageItemList_);
			if (other.Status != MessageSectionStatus.MessageSectionNone)
			{
				this.Status = other.Status;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06007F0D RID: 32525 RVA: 0x0015340A File Offset: 0x0015160A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06007F0E RID: 32526 RVA: 0x00153414 File Offset: 0x00151614
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 104U)
				{
					if (num == 16U)
					{
						this.FrozenItemId = input.ReadUInt32();
						continue;
					}
					if (num == 24U)
					{
						this.Id = input.ReadUInt32();
						continue;
					}
					if (num == 104U)
					{
						goto IL_5A;
					}
				}
				else
				{
					if (num == 106U)
					{
						goto IL_5A;
					}
					if (num == 112U)
					{
						this.Status = (MessageSectionStatus)input.ReadEnum();
						continue;
					}
					if (num == 122U)
					{
						this.itemList_.AddEntriesFrom(ref input, MessageSection._repeated_itemList_codec);
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
				continue;
				IL_5A:
				this.messageItemList_.AddEntriesFrom(ref input, MessageSection._repeated_messageItemList_codec);
			}
		}

		// Token: 0x04003090 RID: 12432
		private static readonly MessageParser<MessageSection> _parser = new MessageParser<MessageSection>(() => new MessageSection());

		// Token: 0x04003091 RID: 12433
		private UnknownFieldSet _unknownFields;

		// Token: 0x04003092 RID: 12434
		public const int FrozenItemIdFieldNumber = 2;

		// Token: 0x04003093 RID: 12435
		private uint frozenItemId_;

		// Token: 0x04003094 RID: 12436
		public const int IdFieldNumber = 3;

		// Token: 0x04003095 RID: 12437
		private uint id_;

		// Token: 0x04003096 RID: 12438
		public const int ItemListFieldNumber = 15;

		// Token: 0x04003097 RID: 12439
		private static readonly FieldCodec<MessageItem> _repeated_itemList_codec = FieldCodec.ForMessage<MessageItem>(122U, MessageItem.Parser);

		// Token: 0x04003098 RID: 12440
		private readonly RepeatedField<MessageItem> itemList_ = new RepeatedField<MessageItem>();

		// Token: 0x04003099 RID: 12441
		public const int MessageItemListFieldNumber = 13;

		// Token: 0x0400309A RID: 12442
		private static readonly FieldCodec<uint> _repeated_messageItemList_codec = FieldCodec.ForUInt32(106U);

		// Token: 0x0400309B RID: 12443
		private readonly RepeatedField<uint> messageItemList_ = new RepeatedField<uint>();

		// Token: 0x0400309C RID: 12444
		public const int StatusFieldNumber = 14;

		// Token: 0x0400309D RID: 12445
		private MessageSectionStatus status_;
	}
}
